/***************************************************************************
 *   This file is part of KLabeler                                         *
 *   Copyright (C) 2010 by Luca Bellonda                                   *
 *   lbellonda _at_ gmail.com                                              *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "KLabelerApplication.h"
#include <KLocale>
#include <KCmdLineArgs>
#include <KAboutData>


TLogger logger(true, KLABELER_LOG_TAG, "/tmp/klabeler.application.log") ;

static const char mailAddress[] = "lbellonda(at)gmail.com";
static const char webAddress[] = "lbell.wordpress.com";
static const char organizationDomain[] = "kde.org";


int main(int argc, char **argv)
{
    KLocale::setMainCatalog(CATALOG_NAME);
    //logger.info("klabeler started");

    KAboutData about(APPL_SERVICE_NAME, CATALOG_NAME, ki18n("klabeler"), APPL_VERSION, ki18n("a tag mark application"),
                     KAboutData::License_GPL, ki18n("(C) 2010 Luca Bellonda"), KLocalizedString(), webAddress, mailAddress);
    about.addAuthor(ki18n("Luca Bellonda"), KLocalizedString(), mailAddress, webAddress);
    about.setOrganizationDomain(organizationDomain);

    KCmdLineArgs::init(argc, argv, &about);
    int returnCode = -1 ;
    klabeler::KLabelerApplication *application = new klabeler::KLabelerApplication(argc, argv);
    if (application->init()) {
        returnCode = application->exec();
    } else {
        returnCode = -2 ;
    }
    //logger.info("klabeler before exit");

    return returnCode ;
}

